/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao.jpa;

import dao.AbstractDao;
import java.io.Serializable;
import java.util.List;
import util.JPAUtil;

/**
 *
 * @author Mário
 */
public abstract class AbstractJpaDao<T, PK extends Serializable>
        implements AbstractDao<T, PK> {

    private Class type;

    public AbstractJpaDao(final Class<T> type) {
        this.type = type;
    }

    public void persist(final T object) {
        JPAUtil.getEntityManager().persist(object);
    }

    public void merge(final T object) {
        JPAUtil.getEntityManager().merge(object);
    }

    public void remove(final T object) {
        JPAUtil.getEntityManager().remove(object);
    }

//    public abstract List<T> getAll();
}
